package com.bawei.live.api

import com.bawei.network.HttpInterceptorType
import com.bawei.network.HttpManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

/**
 * @Author: Lin Liu
 * @CreateTime: 2025年02月17日 15:55:11
 * @Description:
 */
@Module //声明为Hilt模块
@InstallIn(SingletonComponent::class) //声明当前模块可以在应用内注入对象
object LiveServerModule {

    @Provides //提供统一实现
    @Singleton //声明为单例
    fun getLiveServerApi(): LiveServerApi{
        return HttpManager.createApiServer(LiveServerApi::class.java, HttpInterceptorType.INTERCEPTOR)
    }

}